package com.navinfo.tripanalysis.offline.service.impl;

import com.navinfo.tripanalysis.common.arithmetic.common.OuterStatisticData;
import com.navinfo.tripanalysis.offline.service.LoadTripStatisticService;
import com.navinfo.tripanalysis.offline.service.TripStatisticConvertService;
import org.apache.spark.sql.Row;

/**
 * ETL从hive表加载行程统计数据
 * @author 沈东生，web
 */
public class LoadTripStatisticServiceImpl extends AbstractLoadTripDataService<OuterStatisticData> implements LoadTripStatisticService {
    private TripStatisticConvertService tripStatisticConvertService;

    public LoadTripStatisticServiceImpl(TripStatisticConvertService tripStatisticConvertService) {
        this.tripStatisticConvertService = tripStatisticConvertService;
    }

    @Override
    protected OuterStatisticData fromRow(Row row) {
        return tripStatisticConvertService.fromRow(row);
    }
}
